package com.eastfair.venueservice.vo;

import com.eastfair.annotation.annotation.vo.VoInfo;
import com.eastfair.annotation.model.BaseVoGroupClass;
import com.eastfair.venueservice.enumeration.ServiceInventoryCheckCheckStateEnum;
import com.eastfair.vo.BaseVO;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 实体类
 * 盘点记录
 * </p>
 *
 * @author linan
 * @since 2022-09-19
 */
@Data
@ApiModel(value = "ServiceInventoryCheckVO", description = "盘点记录")
public class ServiceInventoryCheckVO extends BaseVO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {BaseVoGroupClass.all.class})
    private Long id;

    /**
     * 是否启用（确认状态）：1是 已确认；0否 未确认
     */
    @ApiModelProperty(value = "是否启用（确认状态）：1是 已确认；0否 未确认")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Integer isEnabled;
    /**
     * 是否删除：1是；0否
     */
    @ApiModelProperty(value = "是否删除：1是；0否")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Integer isDeleted;
    /**
     * 项目id
     */
    @ApiModelProperty(value = "项目id")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Long projectId;
    /**
     * 子系统id
     */
    @ApiModelProperty(value = "子系统id")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Long subsystemId;
    /**
     * 租户id
     */
    @ApiModelProperty(value = "租户id")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Long tenantId;
    /**
     * 制单人
     */
    @ApiModelProperty(value = "制单人")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Long preparedBy;
    /**
     * 盘点单号
     */
    @ApiModelProperty(value = "盘点单号")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @Size(max = 255, message = "盘点单号长度不能超过255")
    private String checkNo;
    /**
     * 开始日期
     */
    @ApiModelProperty(value = "开始日期")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private LocalDate startDate;
    /**
     * 结束日期
     */
    @ApiModelProperty(value = "结束日期")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private LocalDate endDate;
    /**
     * 系统库存总量
     */
    @ApiModelProperty(value = "系统库存总量")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private BigDecimal systemTotalNum;
    /**
     * 盘点总量
     */
    @ApiModelProperty(value = "盘点总量")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private BigDecimal checkTotalNum;
    /**
     * 盘盈总量
     */
    @ApiModelProperty(value = "盘盈总量")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private BigDecimal surplusTotalNum;
    /**
     * 盘亏总量
     */
    @ApiModelProperty(value = "盘亏总量")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private BigDecimal lossTotalNum;
    /**
     * 盘点状态 #{INIT:待开始;ORDER_CANCEL:未完成;REPAIR:已完成}
     */
    @ApiModelProperty(value = "盘点状态 #{INIT:待开始;ORDER_CANCEL:未完成;REPAIR:已完成}")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private ServiceInventoryCheckCheckStateEnum checkState;

    @ApiModelProperty(value = "创建人")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Long createdBy;

    @ApiModelProperty(value = "创建人姓名")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String createdByName;

    /**
     * 服务数量
     */
    @ApiModelProperty(value = "服务数量")
    private Integer serviceNum;


    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private LocalDateTime updateTime;

    /**
     * 盘点明细
     */
    @ApiModelProperty(value = "盘点明细")
    private List<ServiceInventoryCheckDetailVO> serviceInventoryCheckDetailList;

}
